home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / Apache / include / php / regex / regex.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-11-12  |  2.0 KB  |  84 lines

  1. #ifndef _HSREGEX_H_
  2. #define _HSREGEX_H_
  3. #ifndef _HSREGEX_H
  4. #define    _HSREGEX_H    /* never again */
  5. /* ========= begin header generated by ././mkh ========= */
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. /* === regex2.h === */
  11. #ifdef WIN32
  12. #define API_EXPORT(type)    __declspec(dllexport) type __stdcall
  13. #else
  14. #define API_EXPORT(type)    type
  15. #endif
  16.  
  17. typedef off_t regoff_t;
  18. typedef struct {
  19.     int re_magic;
  20.     size_t re_nsub;        /* number of parenthesized subexpressions */
  21.     const char *re_endp;    /* end pointer for REG_PEND */
  22.     struct re_guts *re_g;    /* none of your business :-) */
  23. } regex_t;
  24. typedef struct {
  25.     regoff_t rm_so;        /* start of match */
  26.     regoff_t rm_eo;        /* end of match */
  27. } regmatch_t;
  28.  
  29.  
  30. /* === regcomp.c === */
  31. API_EXPORT(int) regcomp(regex_t *, const char *, int);
  32. #define    REG_BASIC    0000
  33. #define    REG_EXTENDED    0001
  34. #define    REG_ICASE    0002
  35. #define    REG_NOSUB    0004
  36. #define    REG_NEWLINE    0010
  37. #define    REG_NOSPEC    0020
  38. #define    REG_PEND    0040
  39. #define    REG_DUMP    0200
  40.  
  41.  
  42. /* === regerror.c === */
  43. #define    REG_OKAY     0
  44. #define    REG_NOMATCH     1
  45. #define    REG_BADPAT     2
  46. #define    REG_ECOLLATE     3
  47. #define    REG_ECTYPE     4
  48. #define    REG_EESCAPE     5
  49. #define    REG_ESUBREG     6
  50. #define    REG_EBRACK     7
  51. #define    REG_EPAREN     8
  52. #define    REG_EBRACE     9
  53. #define    REG_BADBR    10
  54. #define    REG_ERANGE    11
  55. #define    REG_ESPACE    12
  56. #define    REG_BADRPT    13
  57. #define    REG_EMPTY    14
  58. #define    REG_ASSERT    15
  59. #define    REG_INVARG    16
  60. #define    REG_ATOI    255    /* convert name to number (!) */
  61. #define    REG_ITOA    0400    /* convert number to name (!) */
  62. API_EXPORT(size_t) regerror(int, const regex_t *, char *, size_t);
  63.  
  64.  
  65. /* === regexec.c === */
  66. API_EXPORT(int) regexec(const regex_t *, const char *, size_t, regmatch_t [], int);
  67. #define    REG_NOTBOL    00001
  68. #define    REG_NOTEOL    00002
  69. #define    REG_STARTEND    00004
  70. #define    REG_TRACE    00400    /* tracing of execution */
  71. #define    REG_LARGE    01000    /* force large representation */
  72. #define    REG_BACKR    02000    /* force use of backref code */
  73.  
  74.  
  75. /* === regfree.c === */
  76. API_EXPORT(void) regfree(regex_t *);
  77.  
  78. #ifdef __cplusplus
  79. }
  80. #endif
  81. /* ========= end header generated by ././mkh ========= */
  82. #endif
  83. #endif
  84.